<template>
  <div id="viewData">
    <h1 class="con-right-title">查看详情</h1>
    <el-form ref="form" :model="viewData" label-width="150px">
      <el-form-item label="活动名称：">
        {{ viewData.activityName }}
      </el-form-item>
      <el-form-item label="活动起始时间：">
        {{ viewData.activityStartTime }} 至 {{ viewData.activityEndTime }}
      </el-form-item>
      <el-form-item label="入量渠道：">
        <el-row>
          一级渠道：{{ viewData.oneLevelChannelName || '暂无渠道' }}
        </el-row>
        <el-row>
          二级渠道：{{ viewData.twoLevelChannelName || '暂无渠道' }}
        </el-row>
      </el-form-item>
      <el-form-item label="数据统计：">
        <div class="detailData">
          <div class="detailDataItem">
            <p>活动PV</p>
            <strong>{{ viewData.activityPV }}</strong>
          </div>
          <div class="detailDataItem">
            <p>活动UV</p>
            <strong>{{ viewData.activityUV }}</strong>
          </div>
          <div class="detailDataItem">
            <p>活动分享总数</p>
            <strong>{{ viewData.shareCount }}</strong>
          </div>
          <div class="detailDataItem">
            <p>活动入量总数</p>
            <strong>{{ viewData.flowCount }}</strong>
          </div>
          <div class="detailDataItem">
            <p>活动成单总数</p>
            <strong>{{ viewData.orderCount }}</strong>
          </div>
        </div>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
import { getCollectLikesdata } from '@/api/activityCenter/activityManage/collectPraise'
export default {
  data() {
    return { viewData: {} }
  },
  mounted() {
    this.viewData = JSON.parse(this.$route.query.viewData)
    getCollectLikesdata(this.viewData.activityId, {}, (res) => {
      this.viewData = { ...this.viewData, ...res }
    })
  }
}
</script>
<style lang="less" scoped>
.detailData {
  width: 600px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  .detailDataItem {
    width: 170px;
    height: 90px;
    margin: 0 10px 5px 0;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #333;
    p {
      font-size: 17px;
      font-weight: 800;
      margin-bottom: 0;
    }
  }
}
</style>
